package com.tgy.myplus.others;

import java.text.Collator;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;

class TestSort {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("谷歌", "腾讯", "百度", "淘宝");
        Collator collator = Collator.getInstance(Locale.CHINA);
        list.sort((string1, string2) -> collator.compare(string1, string2));
        list.sort(collator::compare);
        System.out.println(list);
    }
}
